/**
 * 添加和删除信息
 * Ylb generate by auto 2015-09-21 15:03:04
 */

function toAdd(id) {
	var title = "修改信息";
	if (typeof (id) == 'undefined') {
		id = '';
		title = "添加信息";
	}
	
	var src = "/system/menu/tSysMenu/toAddPage.do?id=" + id;
	openWindows("div", "iframe", src, title, '900', '600', true);
}

function toDelete(id) {
	var title = "确认要删除此条记录吗？";
	var src = "/system/menu/tSysMenu/deleteObj.do";
	$.SwalAjaxRequestHelper.AjaxSwalRequest(title, src, {"id" : id}, function(data) {
		 swal({
	     	title: "系统提示",
	        text: data.message,
	        type: "info",
	        confirmButtonColor: "#DD6B55",
	        confirmButtonText: "确定",
	        closeOnConfirm: true
		 }, function () {
	    	$.SystemHelper.ReloadPage();
		 });
	});
}

